package xlhfxlh;

import java.io.Serializable;

public class Student implements Serializable {

    private static final long serialVersionUID = -3193364654654535741L;

    private String name;
    private int age;
    private String addr;
    private char gender;


    public Student() {
        System.out.println("我是无参构造");
    }

    public Student(String name, int age, String addr, char gender) {
        this.name = name;
        this.age = age;
        this.addr = addr;
        this.gender = gender;
        System.out.println("我是全参构造");
    }

    public String getName() { return name; }

    public void setName(String name) { this.name = name; }

    public int getAge() { return age; }

    public void setAge(int age) { this.age = age; }

    public String getAddr() { return addr; }

    public void setAddr(String addr) { this.addr = addr; }

    public char getGender() { return gender; }

    public void setGender(char gender) { this.gender = gender; }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", addr='" + addr + '\'' +
                ", gender=" + gender +
                '}';
    }

}
